]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
cleanup: Don't add linebreak before operators
authorFlorian Müllner <fmuellner@gnome.org>
Mon, 19 Aug 2019 19:33:15 +0000 (21:33 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Sun, 15 Sep 2019 14:02:45 +0000 (16:02 +0200)
When breaking overly long conditions into multiple lines, the operator
should end the previous line instead of starting the new one.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/731

js/ui/boxpointer.js
js/ui/components/networkAgent.js
js/ui/popupMenu.js
js/ui/status/network.js

index 7da11e1331e68a71c85409331ec1870d67b40a38..285454e642ee2aa88219a29a087088cd1b60a03b 100644 (file)
@@ -172,8 +172,8 @@ var BoxPointer = GObject.registerClass({
         let borderWidth = themeNode.get_length('-arrow-border-width');
         minSize += borderWidth * 2;
         natSize += borderWidth * 2;
-        if ((!isWidth && (this._arrowSide == St.Side.TOP || this._arrowSide == St.Side.BOTTOM))
-            || (isWidth && (this._arrowSide == St.Side.LEFT || this._arrowSide == St.Side.RIGHT))) {
+        if ((!isWidth && (this._arrowSide == St.Side.TOP || this._arrowSide == St.Side.BOTTOM)) ||
+            (isWidth && (this._arrowSide == St.Side.LEFT || this._arrowSide == St.Side.RIGHT))) {
             let rise = themeNode.get_length('-arrow-rise');
             minSize += rise;
             natSize += rise;
index 9e1063d2b329ab7a8d20947f14289835b0522754..2de5128439b562c7ee4bcc87de3b038aa02cc755 100644 (file)
@@ -164,9 +164,9 @@ class NetworkSecretDialog extends ModalDialog.ModalDialog {
         if (value.length == 64) {
             // must be composed of hexadecimal digits only
             for (let i = 0; i < 64; i++) {
-                if (!((value[i] >= 'a' && value[i] <= 'f')
-                      || (value[i] >= 'A' && value[i] <= 'F')
-                      || (value[i] >= '0' && value[i] <= '9')))
+                if (!((value[i] >= 'a' && value[i] <= 'f') ||
+                      (value[i] >= 'A' && value[i] <= 'F') ||
+                      (value[i] >= '0' && value[i] <= '9')))
                     return false;
             }
             return true;
@@ -180,15 +180,15 @@ class NetworkSecretDialog extends ModalDialog.ModalDialog {
         if (secret.wep_key_type == NM.WepKeyType.KEY) {
             if (value.length == 10 || value.length == 26) {
                 for (let i = 0; i < value.length; i++) {
-                    if (!((value[i] >= 'a' && value[i] <= 'f')
-                          || (value[i] >= 'A' && value[i] <= 'F')
-                          || (value[i] >= '0' && value[i] <= '9')))
+                    if (!((value[i] >= 'a' && value[i] <= 'f') ||
+                          (value[i] >= 'A' && value[i] <= 'F') ||
+                          (value[i] >= '0' && value[i] <= '9')))
                         return false;
                 }
             } else if (value.length == 5 || value.length == 13) {
                 for (let i = 0; i < value.length; i++) {
-                    if (!((value[i] >= 'a' && value[i] <= 'z')
-                          || (value[i] >= 'A' && value[i] <= 'Z')))
+                    if (!((value[i] >= 'a' && value[i] <= 'z') ||
+                          (value[i] >= 'A' && value[i] <= 'Z')))
                         return false;
                 }
             } else {
index eb06167068758ab2873088e1080551846eddac87..e26771555b68086d9c14caa18b56fce63ffafdba 100644 (file)
@@ -613,8 +613,8 @@ var PopupMenuBase = class {
         while (childBeforeIndex >= 0 && !isPopupMenuItemVisible(children[childBeforeIndex]))
             childBeforeIndex--;
 
-        if (childBeforeIndex < 0
-            || children[childBeforeIndex]._delegate instanceof PopupSeparatorMenuItem) {
+        if (childBeforeIndex < 0 ||
+            children[childBeforeIndex]._delegate instanceof PopupSeparatorMenuItem) {
             menuItem.actor.hide();
             return;
         }
@@ -624,8 +624,8 @@ var PopupMenuBase = class {
         while (childAfterIndex < children.length && !isPopupMenuItemVisible(children[childAfterIndex]))
             childAfterIndex++;
 
-        if (childAfterIndex >= children.length
-            || children[childAfterIndex]._delegate instanceof PopupSeparatorMenuItem) {
+        if (childAfterIndex >= children.length ||
+            children[childAfterIndex]._delegate instanceof PopupSeparatorMenuItem) {
             menuItem.actor.hide();
             return;
         }
index e7512122a72947fd4a4b281d86c3d795196cf82c..575b534c70235e07b6819a2e31666d29d6416562 100644 (file)
@@ -909,8 +909,8 @@ class NMWirelessDialog extends ModalDialog.ModalDialog {
             this._client.activate_connection_async(connection, this._device, null, null, null);
         } else {
             let accessPoints = network.accessPoints;
-            if ((accessPoints[0]._secType == NMAccessPointSecurity.WPA2_ENT)
-                || (accessPoints[0]._secType == NMAccessPointSecurity.WPA_ENT)) {
+            if ((accessPoints[0]._secType == NMAccessPointSecurity.WPA2_ENT) ||
+                (accessPoints[0]._secType == NMAccessPointSecurity.WPA_ENT)) {
                 // 802.1x-enabled APs require further configuration, so they're
                 // handled in gnome-control-center
                 Util.spawn(['gnome-control-center', 'wifi', 'connect-8021x-wifi',